Repository navigation
Own red CI never handed off; every agent reads the whole installation - #973
Conversation
A check red on the pull request and green on the base first gets the mode diagnosis: files the pull request changes are compared with the merge base, and a mode CoderHelm's commits dropped is put back in one commit with no model round; what can't be put back yet is CoderHelm's own problem, alerted and retried. restore_file restores the mode with the bytes, set_mode sets a file's executable bit (refusing links and submodules), and a sandbox chmod says it never reaches the commit. The repair sweep compares with the base, reads failed runs first and resumes a run that ended on red CI. Every worker loop with tools gets list_repos, read_repo_file and search_repo over the team's installation, with the prompt; Chat's prompt says the same. Text claiming CoderHelm can't see or confirm something is rejected unless a tool returned a refusal it names.
…ate the cases it moved
…nd stuck repairs The guard reads first-person claims only (I, we, CoderHelm, the agent): sentences about the code or the product pass untouched. It reads prose lines only: fenced code, data lines and structured output are never read or edited. A look-first retry that fails or runs out of time keeps the first answer and the history it came from. The claim check is part of person_text itself. A stuck mode repair retries while the tries put more back; after three tries with no progress it stops, records why once as its own problem, and the run waits on CI. A sweep whose branch moved gives its claim back. A failed installation read is kept for seconds, not minutes, and a comparison cut at one page says so.
Superseded by CoderHelm's latest review
|
Auto-merge |
…itories Reading stays allowed everywhere. Visibility comes from the installation's repository list; a repository it doesn't name as public counts as private. A reply going to a public repository keeps every private read of its turn and is checked before sending: no verbatim line or code from those reads, no private repository name or path. It is asked for its conclusion in plain words, and what still carries private content is taken out, in prose and structured replies alike, never replaced by a claim that it can't see the code.
| Ok(x) => x, | ||
| Err(e) => { | ||
| warn!(owner, repo, branch, error = %e, "Mode diagnosis: couldn't compare the branch with its base"); | ||
| return ModeFix::Nothing; |
There was a problem hiding this comment.
💬 Suggestion: Failed base comparison still falls through to the normal hand-off (hardening, not verified)
Err(e) => { warn!(...); return ModeFix::Nothing; } in on_red means a transient GitHub read error during against_base hides a real mode drop for that round, and the CI loop goes on down the usual red-CI path. That is the first check of its kind, so it is a follow-up. Returning Stuck on a read error would route it through the bounded retry instead.
This blocks: On the mode-diagnosis main path, a read error returns Nothing and routes red CI to hand-off, breaking the stated never-hand-off invariant
| mr::MAX_STUCK_TRIES | ||
| )); | ||
| super::own_problems::record(state, &msg.team_id, &msg.run_id, &p).await; | ||
| save_stuck(state, &msg.team_id, &msg.run_id, Some(&s)).await; |
There was a problem hiding this comment.
💬 Suggestion: A stuck record that fails to save lets the retry cap be missed (hardening, not verified)
save_stuck only warns when the DynamoDB write fails. On the next try read_stuck finds no record, stuck_step sees prev.is_none() as progress, and tries restarts at 1. If the write keeps failing, MAX_STUCK_TRIES is never reached and the resume repeats every 5 minutes. This needs the repair and the write to both fail for a long time, so it is a note.
Summary
Two causes that ended runs in front of a person when CoderHelm could have finished on its own.
chmodnever reaches the commit, andrestore_filewrote the branch's mode, not the ref's), so the run ended failed on red CI and was handed to a person.Invariants
failedon red CI.git_mode.restore_filerestores the mode from the same ref as the bytes. The newset_modetool sets the executable bit or puts back the base's mode as a commit, and refuses symbolic links and submodules. A sandboxchmodsays it doesn't reach the commit.list_repos,read_repo_fileandsearch_repo, read only, added in the one place those loops start. A source scan fails on any loop that goes around it. Chat and team agents read the same repositories through their code tools.Changes
clients::git_mode:mode_movedecides a mode change and refuses links and submodules.against_basereads a path's head against the merge base.GitHubClient::set_modemakes a mode-only commit, moved only as a fast forward.merge_base_and_filesadded.mode_repair:base_plan,against_base,write_restore,on_red(the CI diagnosis).set_mode_tool/set_mode_callandrestore_mode.resume:mode_causeruns before the stall check and at the start ofhand_off_red_ci.resume_after_mode_repairadded.set_modearm, andrestore_filerestores the mode.coder_shell::CHMOD. Tool registry entries.common::repo_reach(new): the cross-repository tools, their prompt, refusals, and the guard (claim,allowed,strip,look_first).GitHubHost::installation_repos.agent::reach, wired intoprovider::converse_as: tools, prompt, refusal tracking, the answer guard, and the private-content check for replies posted in public repositories (repo_reach::{leak, redact}, visibility fromGitHubHost::installation_listing).chat_agent::run.rendered::person_text/person_text_afterandreply_compose::finishhold the same rule.xq_own_modes_never_red_ciandxp_answers_read_the_other_repo, each with its page.Verification
Invented replays:
restore_filekeeps the mode;set_moderefuses links and submodules;Local checks:
cargo fmt --all --checkrustfmt --checkon the incident cases-D warningson common, worker and gateway